abstract class SIM {
     abstract void setNumber(String n);
     abstract String giveNumber();
     abstract String giveCorpName();
}
class SIMOfChinaUnicom extends SIM {
    String number;
     void setNumber(String n) {
        number = n;
    }
     String giveNumber() {
        return number;
    }
     String giveCorpName() {
        return "中国联通";
    }
}
public class MobileTelephone {
   SIM card;
    void useSIM(SIM card) {
      this.card=card;
   }
    void showMess() {
      System.out.println("使用的卡是:"+card.giveCorpName()+"提供的");
      System.out.println("手机号码是:"+card.giveNumber());
   }
}
class Application {
    static void main(String args[]) {
      MobileTelephone telephone = new MobileTelephone ();
      SIM sim=new SIMOfChinaMobile();
      sim.setNumber("13887656432");
      telephone.useSIM(sim);
      telephone.showMess();
      sim=new SIMOfChinaUnicom();
      sim.setNumber("13097656437");
      telephone.useSIM(sim);
      telephone.showMess();
   }
}
class SIMOfChinaUnicom extends SIM {
    String number;
     void setNumber(String n) {
        number = n;
    }
    String giveNumber() {
        return number;
    }
     String giveCorpName() {
        return "中国联通";
    }
}
